<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class OpenSocial</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class OpenSocial</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Client library helper for making OpenSocial requests.</p>
		<p class="notes">
			Located in <a class="field" href="_OpenSocial.php.html">/OpenSocial.php</a> (line <span class="field">57</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																						
				<div class="method-definition">
											<span class="method-result">OpenSocial</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$config</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$httplib</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$cache</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#fetchFriends" title="details" class="method-name">fetchFriends</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$guid</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">array()</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#fetchPerson" title="details" class="method-name">fetchPerson</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$guid</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">array()</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#request" title="details" class="method-name">request</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$requests</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$use_rest</span> = <span class="var-default">False</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#sendRestRequest" title="details" class="method-name">sendRestRequest</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$request</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#sendRestRequests" title="details" class="method-name">sendRestRequests</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$requests</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#sendRpcRequests" title="details" class="method-name">sendRpcRequests</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$requests</span>)
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">67</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Initializes this client object with the supplied configuration.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">OpenSocial</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$config</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$httplib</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$cache</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$config</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$httplib</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$cache</span>			</li>
				</ul>
		
			
	</div>
<a name="methodfetchFriends" id="fetchFriends"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">fetchFriends</span> (line <span class="line-number">231</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Fetches the friends of the specified user.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			fetchFriends
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$guid</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$guid</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$fields</span>			</li>
				</ul>
		
			
	</div>
<a name="methodfetchPerson" id="fetchPerson"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">fetchPerson</span> (line <span class="line-number">223</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Fetches a single person.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			fetchPerson
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$guid</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$guid</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$fields</span>			</li>
				</ul>
		
			
	</div>
<a name="methodrequest" id="request"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">request</span> (line <span class="line-number">118</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Accepts a list of OpenSocialRequest objects and sends each to the  configured container, attempting to use RPC by default, but falling back  to REST if RPC is not configured.</p>
	<ul class="tags">
				<li><span class="field">return:</span> If an array was passed in, an array of the parsed responses      from these requests.  Otherwise, if a single request was passed, the      single response from the request.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			request
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$requests</span>, [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$use_rest</span> = <span class="var-default">False</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$requests</span><span class="var-description">: An array of OpenSocialRequest objects or a single      OpenSocialRequest object.</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$use_rest</span><span class="var-description">: An override to prevent default behavior.  Set this      to True to use REST even if RPC is configured.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsendRestRequest" id="sendRestRequest"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">sendRestRequest</span> (line <span class="line-number">208</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sends a single REST request to the configured container and returns the  parsed response.  Before sending the request to the container, this method  signs the request with the configured credentials.</p>
	<ul class="tags">
				<li><span class="field">return:</span> The parsed response of the request.</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			sendRestRequest
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$request</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$request</span><span class="var-description">: The OpenSocialRequest object to send.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsendRestRequests" id="sendRestRequests"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">sendRestRequests</span> (line <span class="line-number">193</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sends an array of requests to the configured container.</p>
	<ul class="tags">
				<li><span class="field">return:</span> A map of the request ID number and the parsed responses  from the container.</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			sendRestRequests
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$requests</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$requests</span><span class="var-description">: An array of OpenSocialRequest objects.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsendRpcRequests" id="sendRpcRequests"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">sendRpcRequests</span> (line <span class="line-number">138</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sends a request or set of requests using the RPC protocol.</p>
	<ul class="tags">
				<li><span class="field">return:</span> If an array was passed in, an array of the parsed responses      from these requests.  Otherwise, if a single request was passed, the      single response from the request.</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			sendRpcRequests
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$requests</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$requests</span><span class="var-description">: A single OpenSocialRequest or an array of      OpenSocialRequest objects.</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Wed, 17 Dec 2008 14:03:07 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.2</a>
	</p>
	</div></body>
</html>